﻿<?php
require_once("include/common.inc.php");
require_once("include/dedesql.class.php");

$title = '法治天下 - 法律法规搜索';
require_once('common/header.php');

if(trim($keyword) == ""){
	echo "无效请求";exit;
}

$keyword = addslashes($_POST['keyword']);

if(strlen(trim($keyword)) > 0){
	if(count($objval) > 0){
		$positive_title_arr = implode(',', $objval);
		$execSql = "select * from cms_archives a, article_options_mapping b where (a.title like '%".$keyword."%' or a.keywords like '%".$keyword."%' or a.description like '%".$keyword."%') and a.typeid in (42) and a.id = b.article_id and b.option_value in (".$positive_title_arr.") and b.option_keyname = 'positive_title'";
	}else{
		$execSql = "select * from cms_archives where title like '%".$keyword."%' or keywords like '%".$keyword."%' or description like '%".$keyword."%' and typeid in (42)";
	}
	//echo $execSql;
}
$title = "按关键字搜索'" . $_POST['keyword'] . "'的法律法规";
?>
<style>
.titbox {
height: 42px;
padding-top: 20px;
padding-left: 0px;
line-height: 29px;
font-size: 16px;
}
.pub_time {
color: #9C9C9C;
}
</style>

<div class="meun2 clearfix">
	<dl>
		<dd><a href="" class="school_a"><span>法律法规搜索</span></a></dd>
	</dl>
</div>
<div class="index_box clearfix">
	<div class="left_info">
<!--- Search  start------>
		<div class="cn_box01" style="height:800px">
			<div class="titbox"><strong><?=$title?></strong></div>
			<ul class="one_row_box031">
				<li style="line-height: 24px;color: #0B3B8D;">
					<?php
						$dsql->SetQuery($execSql);
						$dsql->Execute();
						$i = 0;
						while($row = $dsql->GetArray())
						{
							echo "<a href=\"./info.php?id=".$row['id']."\" target=\"_blank\" style=\"width:480px\">".$row["title"]."</a><a class='date'>".date("Y-m-d", $row['senddate'])."</a>";
							$i++;
						}
						
						if($i == 0){
							echo "未搜索到相关文章.";
						}
					?>
				</li>
			</ul>
		</div>
<!--- end------>
		<div class="height_3"></div>
	</div>
	<div class="right_info">
		<?php
		require_once('common/right.php');
		?>
	</div>
</div>
<?php
require_once('common/footer.php');
?>